/**
 * @Author:  蓝建平
 * @Description:
 * @Date:  2019/12/4
 */
class People{
  String name;
  int age;
  String gendar;
//  People(String name,int age)
//  {
//    this.name=name;this.age=age;
//  }
  People(this.name,this.gendar){

  }
  //命名枸造方法
  People.withName(String name){
    this.name=name;
  }
//  People(String name)
//  {
//    构造方法不能重载
//  }
  void work()
  {
    print("$name----$age");
  }
}
void main(){
  var people=new People("name", 23);
  people.work();
  var people2=new People.withName("hela");
}